/*
 * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
 * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
 */
package com.yxw.live_vod_backend_boot.controller;

import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.yxw.live_vod_backend_boot.service.BillingSetupService;
import org.springframework.beans.factory.annotation.Autowired;
import com.yxw.yxnet_cd_center.common.utils.BaseResult;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
/**
 * @author Administrator
 */
@Slf4j
@Api(value = "feign外部调用", tags = "feign外部调用")
@RestController
@Validated
@RequestMapping("/backend/feign")
public class LiveFeignController {

    @Autowired
    private BillingSetupService oBillingService;

    /**
     * 直播扣费规则
     * @return BaseResult
     */
    @GetMapping("/getFeeDeductRatio")
    @ApiOperation(value = "直播扣费规则")
    public BaseResult getFeeDeductRatio(){
        return BaseResult.success(oBillingService.getFeeDeductRatio());
    }

    /**
     * 视频币兑换规则
     * @return BaseResult
     */
    @GetMapping("/getVideoCoinRatio")
    @ApiOperation(value = "视频币兑换规则")
    public BaseResult getVideoCoinRatio(){
        return BaseResult.success(oBillingService.getVideoCoinRatio());
    }

    /**
     * 点播空间大小
     * @return BaseResult
     */
    @GetMapping("/getOnDemandSpaceSize")
    @ApiOperation(value = "点播空间大小")
    public BaseResult getOnDemandSpaceSize(){
        return BaseResult.success(oBillingService.getOnDemandSpaceSize());
    }
}
